/* 
 * File:   multipipe.h
 * Author: samuel
 *
 * Created on 21 mars 2012, 15:43
 */

#ifndef MULTIPIPE_H
#define	MULTIPIPE_H

#ifdef	__cplusplus
extern "C"
{
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <unistd.h>
#include <fcntl.h>
#define IN      0
#define OUT     1
#define READ    0
#define WRITE   1
#define MAXLINE 10

    bool DEBUG = false;
    bool OUTPUT = false;
    bool F = false;

    char** cmd;
    int nbcmd;
    char* filename;

    int start(int argc, char** argv);
    char* substr(char *src, int pos, int len);
    int routine();
    char* getFirstCMD(char** cmd);


#ifdef	__cplusplus
}
#endif

#endif	/* MULTIPIPE_H */

